﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="bills.ascx.cs" Inherits="TrangSucShop.administrator.AdminUsercontrol.bills" %>
<asp:MultiView runat="server" ActiveViewIndex="0" ID="MT1">
<asp:View runat="server" ID="Manager">
 <table style="width:100%;">
 <tr>
 <th colspan="3" height="50" align="center">
            &nbsp;<h1>
                Quản ly đơn hàng</h1>
             </th>
 </tr>
    <tr>
        
        <th colspan="3" height="50">
            <asp:Label ID="Label1" runat="server" Font-Italic="True" ForeColor="Red"></asp:Label>
        </th>
    </tr>
    <tr>
         <td>
             &nbsp;</td>
         <td align="right" colspan="2">
             Ngày:<asp:DropDownList ID="DropDownList3" runat="server">
                 <asp:ListItem>tất cả</asp:ListItem>
             </asp:DropDownList>
             Trạng thái:
             <asp:DropDownList ID="DropDownList2" runat="server">
             </asp:DropDownList>
             <asp:Button ID="Button2" runat="server" CausesValidation="False" 
                 onclick="Button2_Click" Text="tìm" Width="100px" />
         </td>
     </tr>
     <tr>
         <td align="center" colspan="3">
             <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                 AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
                 BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                 DataKeyNames="ID" ForeColor="Black" GridLines="Vertical" 
                 onpageindexchanging="GridView1_PageIndexChanging" 
                 onrowcommand="GridView1_RowCommand" onrowdatabound="GridView1_RowDataBound" 
                 onrowediting="GridView1_RowEditing" onsorting="GridView1_Sorting" PageSize="8" 
                 ShowFooter="True" Width="100%" onrowdeleting="GridView1_RowDeleting">
                 <RowStyle BackColor="#F7F7DE" />
                 <Columns>
                    
                     <asp:BoundField DataField="Ma" HeaderText="Mã" 
                         SortExpression="Ma" >
                         <HeaderStyle Font-Underline="True" />
                     </asp:BoundField>
                     <asp:BoundField DataField="HoTen" HeaderText="Khách hàng" 
                         SortExpression="HoTen" >
                         <HeaderStyle Font-Underline="True" />
                     </asp:BoundField>
                     <asp:BoundField DataField="ThoiGian" HeaderText="Thời gian" 
                         SortExpression="ThoiGian" >
                         <HeaderStyle Font-Underline="True" />
                     </asp:BoundField>
                     <asp:BoundField DataField="TongTien" HeaderText="Tổng tiền" 
                         SortExpression="TongTien">
                         <HeaderStyle Font-Underline="True" />
                     </asp:BoundField>
                     <asp:BoundField DataField="TenTT" HeaderText="Trạng thái" 
                         SortExpression="TenTT">
                         <HeaderStyle Font-Underline="True" />
                     </asp:BoundField>
                     <asp:TemplateField HeaderText="chi tiết">
                         <ItemTemplate>
                             <asp:LinkButton ID="LinkButton2" runat="server" 
                                 CommandArgument='<%# Eval("ID") %>' CommandName="Edit"> chi tiết</asp:LinkButton>
                         </ItemTemplate>
                         <ControlStyle Width="100px" />
                         <HeaderStyle Width="100px" Font-Underline="False" />
                         <ItemStyle HorizontalAlign="Center" Width="100px" />
                     </asp:TemplateField>
                     <asp:TemplateField HeaderText="Xóa">
                         <ItemTemplate>
                             <asp:LinkButton ID="LinkButton1" runat="server" 
                                 CommandArgument='<%# Eval("ID") %>' CommandName="Delete"> Xóa</asp:LinkButton>
                         </ItemTemplate>
                         
                         <ControlStyle Width="100px" />
                         <HeaderStyle Width="100px" Font-Underline="False" />
                         <ItemStyle HorizontalAlign="Center" Width="100px" />
                     </asp:TemplateField>
                 </Columns>
                 <FooterStyle BackColor="#CCCC99" />
                 <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                 <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                 <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                 <AlternatingRowStyle BackColor="White" />
             </asp:GridView>
         </td>
     </tr>
     <tr>
         <td>
             &nbsp;</td>
         <td>
             &nbsp;</td>
         <td>
             &nbsp;</td>
     </tr>
    
</table>
</asp:View>
<asp:View runat="server" ID="Edit">
    <table style="width:100%;">
        <tr>
            <th colspan="4"><h1>
                Thông Tin Đơn hàng
            </h1>
                &nbsp;</th>
        </tr>
        <tr>
            <th colspan="4">
                <asp:Label ID="Label3" runat="server" Font-Italic="True" ForeColor="Red"></asp:Label>
            </th>
        </tr>
        <tr>
            <td>
                Họ và Tên:</td>
            <td>
                <asp:TextBox ID="TextBox1" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
            <td width="150">
                Email:</td>
            <td>
                <asp:TextBox ID="TextBox6" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Số Điện thoại:</td>
            <td>
                <asp:TextBox ID="TextBox2" runat="server" Enabled="False" Width="200px"></asp:TextBox>
            </td>
            <td class="style1">
                Trạng thái:</td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server" Width="200px">
                </asp:DropDownList>
            </td>
        </tr>
       
        <tr>
            <td colspan="4">
            
                <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="IDSP"  ShowFooter="True" Width="100%" BackColor="White" 
                    BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                    ForeColor="Black" GridLines="Vertical" 
                    >
                    
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>
                        <asp:TemplateField HeaderText="">
                            <ItemTemplate>
                                <asp:Image ID="imgSach" runat="server" Height="40" 
                                    ImageUrl='<%#"../../images/"+Eval("HinhSP") %>' Width="40" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Sản Phẩm">
                            <ItemTemplate>
                                <asp:Label ID="lblTenSP" runat="server" Text='<%# Bind("TenSP") %>' Width="100"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Giá Tiền">
                            <ItemTemplate>
                                <asp:Label ID="lblGiaTien" runat="server" Text='<%# Bind("GiaSP") %>' 
                                    Width="84"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Số Lượng">
                            <FooterTemplate>
                                Tổng tiền:
                            </FooterTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lbSoLuong" runat="server" Text='<%# Bind("SoLuong") %>' 
                                    Width="60px"></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtSoLuong" runat="server" Height="15px" 
                                    Text='<%# Bind("SoLuong") %>' Width="50px"></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="">
                            <ItemTemplate>
                                <asp:Label ID="lblTonkho" runat="server" Text='<%#"/"+ Eval("TonKho") %>' 
                                    Width="30"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tổng Tiền">
                            <FooterTemplate>
                                <asp:Label ID="lblThanhTien" runat="server" Text="<%#lblThanhTienValue() %>">lblThanhTien</asp:Label>
                            </FooterTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblTongTien" runat="server" Text='<%# Bind("ThanhTien") %>' 
                                    Width="70"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%-- <asp:ButtonField CommandName="Update" Text="Sửa" />--%>
                        <%-- <asp:ButtonField CommandName="Delete" Text="Xóa" />--%>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                    
                </asp:GridView>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="Button1" runat="server" Text="Lưu" Width="100px" 
                    onclick="Button1_Click" />
            </td>
        </tr>
    </table>


</asp:View>
</asp:MultiView>